package com.aceitunaproject.server.terrain;

import java.util.List;

import com.aceitunaproject.server.combat.CombatEffects;
import com.aceitunaproject.server.equipment.Equipment;
import com.aceitunaproject.server.installation.InstallationType;
import com.aceitunaproject.server.materialgoods.GoodProduction;

/**
 * 
 * Represents a terrain characteristic a map tile can have, as Plains, Forest,
 * Mountains, Hills,etc
 * 
 * @author Federico Bergstein
 * 
 */
public interface TerrainType {

	/**
	 * 
	 * Gets the combat effects on an unit equipped with the given equipment
	 * 
	 * @param equipment
	 *            the equipment to return the combat effects of the terrain on.
	 * @return the combat effects of the terrain on units equipped with the
	 *         Equipment.
	 */
	CombatEffects getCombatEffects(Equipment equipment);

	/**
	 * The combat effects when an unit with equipment A fights an unit with
	 * EquipmentB in this terrain type
	 * 
	 * @param equipmentA
	 *            one of the equipments
	 * @param equipmentB
	 *            another equipment
	 * @return combat effects
	 */
	CombatEffects getCombatEffects(Equipment equipmentA, Equipment equipmentB);

	/**
	 * Gets he default, non-localized name of the terrain type (such as
	 * "Forest")
	 * 
	 * @return The default, non-localized name of the terrain type (such as
	 *         "Forest")
	 */
	String getDefaultName();

	/**
	 * 
	 * Gets the movement effects on an unit equipped with the given equipment
	 * 
	 * @param equipment
	 *            the equipment to return movement combat effects of the terrain
	 *            on.
	 * @return the movement effects of the terrain on units equipped with the
	 *         Equipment.
	 */
	MovementEffects getMovementEffects(Equipment equipment);

	/**
	 * Gets the types of installations that can be built in these kind of
	 * terrain
	 * 
	 * @return The types of installations that can be built in these kind of
	 *         terrain
	 */
	List<InstallationType> getAllowedInstallationTypes();

	/**
	 * Gets the types of installations that CANNOT be built in Map Tiles that
	 * contain this terrain type (Even if it is allowed by another terrain type
	 * of the Map Tile)
	 * 
	 * @return The types of installations that CANNOT be built in Map Tiles that
	 *         contain this terrain type
	 */
	List<InstallationType> getDisAllowedInstallationTypes();

	/**
	 * Gets the resources of tiles that belong to this terrain type
	 * 
	 * @return the resources of tiles that belong to this terrain type
	 */
	List<GoodProduction> getResources();

	/**
	 * Gets the equipment needed to build a settlement in a tile that has this
	 * terrain type. If no special equipment is needed it returns a 0 element
	 * list.
	 * 
	 * @return the equipment needed to build a settlement in a tile
	 */
	List<Equipment> getSettlementEquipmentNeeded();

	/**
	 * Returns false if not settlements can be builts in this tile.
	 * 
	 * @return true if settlements can built, false if not.
	 */
	boolean allowsSettlements();

}
